package com.dtx.csnotes.quee;

import java.util.Iterator;

public class Demo {

    public static void main(String[] args) throws Exception {
        MyQueue<String> listQueue = new ListQueue<>();
        listQueue.add("A");
        listQueue.add("B");
        listQueue.add("C");
        listQueue.add("D");
        Iterator<String> iterator = listQueue.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
        System.out.println(listQueue.remove());
        System.out.println(listQueue.remove());
        System.out.println(listQueue.remove());
        System.out.println(listQueue.remove());
    }
}
